package snake;

//该类为身体节点

class Node {
    private final int x;
    private final int y;

//成员变量x和y构成了一个Node的状态
    Node(int x, int y){
        this.x = x;
        this.y = y;
    }

    public int getX(){
        return x;
    }

    public int getY(){
        return y;
    }
}
